
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.List"%>
<!DOCTYPE html>


<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <style type="text/css">
    <!--
    body {
    background-color: #FFFF99;
    }
body,td,th {
        //Hobo Std
    font-family: Arial, Helvetica, sans-serif;
    }

.Estilo1 {
    color: #FFFFFF;
    font-weight: bold;
    }
    .Estilo2{
        color:#FFFFCC;
    }#mostrarERR{
        margin-top: -150px;
        margin-left: 480px;
    }#imagen{
       margin-top: 100px;
        margin-left: 100px; 
    }
     #titulo{
        
    font-family: Hobo Std;
    font-size: 130%;
    }
</style>
        <title>JSP Page</title>
    </head>
    <body>
      
<form action="GuardarUsuario.htm" method="POST">
    <%
        String name = request.getParameter("usuario_nombre");
        String apellido= request.getParameter("usuario_apellido");
        String user = request.getParameter ("usuario_user");
        String pw = request.getParameter("usuario_clave");
    %>
    
    <table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr align="center" bgcolor="#CC9933">
    <td  id ="titulo" colspan="2"><h2><span class="Estilo1">Bienvenido Invitado</span></h2></td>
    </tr></table>
     <center><h3>Regístrate</h3></center>
    <table width="500" border="0" align="center" cellpadding="0" cellspacing="2">
        <tbody>
            <tr>
                <td><strong><span>Nombre</span></strong></td>
                <td><input size="40" type="text" name="usuario_nombre" value="<%=name==null?"":name%>"/></td>
            </tr>
            <tr>
                <td><strong><span>Apellido</strong></span></td>
                <td><input size="40" type="text" name="usuario_apellido" value="<%=apellido==null?"":apellido%>"/></td>
            </tr>
            <tr>
                <td><strong><span>User</strong></span></td>
                <td><input size="40" type="text" name="usuario_user" value="<%=user==null?"":user%>"/></td>
            </tr>
            <tr>
                <td><strong><span>Clave</strong></span></td>
                <td><input size="40" type="password" name="usuario_clave" value="<%=pw==null?"":pw%>"/></td>
            </tr>
            
            <tr>
                 <td><span><strong>Privilegio</strong></span></td>
        <td><select name="usuario_privilegio">
                <option value ="0">Cliente</option>
            
        </select></td>
                
            </tr>
            <tr>
                <td>&nbsp;</td>
                <td colspan="2"><input type="submit" name="guardar" value="Guardar"/>
                    <input type="reset" value="Limpiar">
                <input type="button" value="Volver" name="Volver" onclick="history.back()" />
                
            
             </td>
            </tr>
        </tbody>
    </table>
                 <% 
List errorMsgs = (List) request.getAttribute("errorMsgs");

%>
     <div id="mostrarERR">
     <table align="center">
<%if(errorMsgs != null){%>

            
            <ul>
                <%Iterator items = errorMsgs.iterator();
             while ( items.hasNext() ) {
            String message = (String) items.next();%>
            <tr><td> <font color="red"><%=message %>  </font></td></tr>
            <% }%>
            </ul>          

</table></div><% }%> 
      <div id='imagen'>
            <table border ="0" align = "center">
                
               <tr> <td width="50"><img src="${pageContext.request.contextPath}/img/ososaluda.gif" width="130" height="180" /></td></tr>
                
            </table>
            </div></form>
    </body>
</html>
